package com.spingboot.study.controller;
import com.spingboot.study.annotation.RateLimit;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/order")
public class OrderController {

    @GetMapping("/submit")
    @RateLimit(time = 5000) // 5秒内只能调用一次
    public String submitOrder(@RequestParam String userId) {
        // 模拟业务逻辑
        return "订单提交成功，用户: " + userId;
    }
}
